#include "main.hh"
#include "BankSystem.hh"
#include "IO.hh"
#include <iostream>
using namespace Bank;

void showMainMenu() {
    std::cout << "\n========== MINI BANKING SYSTEM ==========\n";
    std::cout << "1. Register New Customer\n";
    std::cout << "2. Display All Accounts\n";
    std::cout << "3. Generate Transaction Report\n";
    std::cout << "4. Access Customer Accounts\n";
    std::cout << "5. Exit\n";
    std::cout << "=========================================\n";
    std::cout << "Please choose an option: ";
}

int main() {
    BankSystem& bank = BankSystem::getInstance();
    int option;
    do {
        showMainMenu();
        option = IO::getNumber();

        switch (option) {
            case 1:
                bank.handleCustomerRegistration();
                break;
            case 2:
                bank.displayAllAccounts();
                break;
            case 3:
                bank.generateGlobalReport();
                break;
            case 4:
                bank.accessCustomerAccounts();
                break;
            case 5:
                std::cout << "Goodbye!\n";
                break;
            default:
                std::cout << "Invalid option. Please try again.\n";
        }
    } while (option != 5);
    return 0;
}